<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnTenantConfirmStatusInSupplier extends AbstractMigration
{
    public function up()
    {
        $this->table('supplier')
            ->addColumn('confirm_status', 'enum', ['values' => ['wait_confirm', 'accept', 'reject'], 'default' => 'wait_confirm', 'comment' => '确认状态: 待对方确认,已接收,已拒绝'])
            ->addColumn('create_tenant_id', 'integer', ['default' => 0, 'limit' => 11, 'signed' => false, 'comment' => '创建者租户id'])
            ->save();
    }

    public function down()
    {
        $this->table('supplier')
            ->removeColumn('confirm_status')
            ->removeColumn('create_tenant_id')
            ->save();
    }
}
